package com.ymatou.iapi.productsync.service;

import java.util.ArrayList;
import java.util.List;

import org.json.JSONObject;

import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.MapUtil;
import com.ymttest.utils.TestDataManager;

public class MongocrudCallOld extends YmatouAutoTestCall {

	private static String opurl="api/cache/mongocrud";
	
	public MongocrudCallOld(){
		super(EnvSetup.getSystemUrl("productsync"), opurl, "GET", "JSON");
	}
	
	
	@Override
	public void addDefHeader(){
		client.addHeader("Content-Type", "application/json");
	}
	
	 
	public JSONObject callAndGetReturnData(int activityId,String productId,String actionType){
		
		
		return callAndGetReturnData(MapUtil.hashMap("ActivityId", activityId,"ProductId",productId,"ActionType",actionType,"TransactionId", TestDataManager.getRandomIntNum(8)));
	}

	
	public static void main(String[] args) {
		List<String> aList = new ArrayList<>();
		aList.add("41cf8ee1-3d18-46da-9928-023a107b3e4c");
		JSONObject aa = new MongocrudCallOld().callAndGetReturnData(0,"b01f8d32-4886-4bb3-b165-24eda3767734","AddProduct");
		int cc=1;
	}

}
